{include file="main/general_header.html"}

	<div id='header' class='clear_block'>
		<div id='headerTop'>
			<div id='logo'></div>
			<div class='container'>
				<div class='left'>
					<ul>
					{foreach from=$menu key=section_name item=subsection}
						{if $section_name == $menu_group}
							{foreach from=$subsection item=nav}
								{if (($nav.title == "Tasks" || $nav.title == "Công Việc") && $nav.children)}
									{foreach from=$nav.children item=navc}
										{if $navc.display_order > 0}
										{if $translate[$navc.prefix]}
											<li class='spacer'> </li>
											<li id='sub_nav_{$navc.menu_id}'>
												<a href="{$translate[$navc.prefix]}{$navc.prefix}/{$navc.action}">
													<span>{$navc.title}</span>
												</a>
											</li>
										{else}
											{if $navc.prefix == 'RAW'}
												<li class='spacer'> </li>
												<li id='sub_nav_{$navc.menu_id}'>
													<a href="{$navc.action}">
														<span>{$navc.title}</span>
													</a>
												</li>
											{else}
												<li class='spacer'> </li>
												<li id='sub_nav_{$navc.menu_id}'>
													<a href="{$base_dir}index.php/{$navc.prefix}/{$navc.action}">
														<span>{$navc.title}</span>
													</a>
												</li>
											{/if}
										{/if}
										{/if}
									{/foreach}
									
								{/if}
							{/foreach}
						{/if}
					{/foreach}
						<li class='spacer'> </li>
						<li id='sub_nav_{$navc.menu_id}'>
							<a href="../Access/logout">
								<span>{translate}Logout{/translate} </span>
								<span id='usernameInfo'>({$me->get_username()})</span>
							</a>
						</li>
					</ul>
				</div>
				
				<div id='searchBox' class='right'>
					<div class='form_item'>
						<input id='quickSearch' class="form_text" type="text" title="{translate}Enter patient ID or patient name{/translate}" value="" size="15" maxlength="128"/>
					</div>
				</div>
				
			</div>
		</div>
		
	</div>
		
		<!--div id="topsection">				
			<div class='messageAlert' id='newMessageAlert'></div>
		</div-->

	<input type="hidden" name="menu_mode" id="menu_mode" value="none">
	<div id="bodyWrapper">
		<div id="bodyContainer" class='clear_block'>
	        {if is_object($messages)}
	        	{$messages->render()}
	        {elseif is_array($messages)}
	            {foreach from=$messages item=message}
					{if is_array($message)}
	                	{$message.title} {$message.message}
					{else}
						{$message}
					{/if}
					<br>
	            {/foreach}
	        {elseif strlen($messages) >0}
	        	{$messages}
	        {/if}
	        {$display}
		</div>
		<div id="patientSearchDialog1111" style="display: none;"></div>
	</div>
	<div>
		<div id="footer" class='container'>
			{translate p1='<a href="http://www.lhvsoftware.com" target="_blank">' p2='</a>'}Copyright (c) 2008 - 2009 %sLHV Software%s{/translate}.
		</div>
	</div>
	<div id='quickNav'>		
		<div id='utilityNav'>
			<ul>
			<li><a id="listSubmenuLancher" href="#">{translate}List management{/translate}</a></li>			
			{foreach from=$menu key=section_name item=subsection}
				{if $section_name == $menu_group}
					{foreach from=$subsection item=nav}
						{if (($nav.title == "Utilities" || $nav.title == "Tiện ích") && $nav.children)}
							{foreach from=$nav.children item=navc}
								{if $navc.display_order > 0}
								{if $translate[$navc.prefix]}
									<li id='sub_nav_{$navc.menu_id}'><a href="{$translate[$navc.prefix]}{$navc.prefix}/{$navc.action}">{$navc.title}</a></li>
								{else}
									{if $navc.prefix == 'RAW'}
										<li id='sub_nav_{$navc.menu_id}'><a href="{$navc.action}">{$navc.title}</a></li>
									{else}
										<li id='sub_nav_{$navc.menu_id}'><a href="{$base_dir}index.php/{$navc.prefix}/{$navc.action}">{$navc.title}</a></li>
									{/if}
								{/if}
								{/if}
							{/foreach}
							
						{/if}
					{/foreach}
				{/if}
			{/foreach}
			</ul>
		</div>
		
		<div id="listSubmenuContainer" style="display: none;">			
			<div id="listSubmenuNav">
				<ul class="listSubmenu">										
					<li><a class="list_submenu_item" href="javascript:openEmployeeDialog();">{translate}Employee{/translate}</a></li>					
					<li><a class="list_submenu_item" href="javascript:openMedicineDialog();">{translate}Medicine{/translate}</a></li>
					<li><a class="list_submenu_item" href="javascript:openAreaDialog();">{translate}Area{/translate}</a></li>
				</ul>
			</div>
		</div>
	</div>
	
	<div id="listSubmenuDialog" style="display: none;"></div>	
	
	{include file="main/element_ajax_loader.html"}
</body>
</html>
